<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>SJ3</title>
</head>
<body>
<div id="app">
  <ul>
    <li v-for="(item,index) in fruit" :key="index">
      {{item.name}}-{{item.discount}}-{{item.price | money(0.5)}}元
    </li>
  </ul>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript">
    var vm = new Vue({
      el:"#app",
      data:{
        fruit:[
          {name:"苹果",discount:"促销5折",price:12.2},
          {name:"香蕉",discount:"促销5折",price:7.5},
          {name:"雪梨",discount:"促销5折",price:32.5},
          {name:"柑橘",discount:"促销5折",price:7.5},
        ]
      },
      filters:{
        money:function (price,arg1){
          var money = price*arg1
          return money;
        }
      }
    });
</script>
</body>
</html>